#coding:utf8
#
# Author: CMGS
# Created on 2010-12-28
#

from libs.crawler import Crawler
from libs.debugger import Debugger

# TODO 
# 解析内容，分离meta数据和block数据
# 异步刷入数据集群
# 同步刷入关系数据库
class Basic(object):
    pass

class Rss10(Basic):
    pass

class Rss20(Basic):
    pass

class Atom03(Basic):
    pass

# 异步得到数据
def update(url = ''):
    crawler = Crawler(url)
    crawler.rawlink(_callback)
    crawler.start()
    Debugger.out('invoke %s' % url)

# 存入数据库
def _callback(ins):
    result = ins.value
    Debugger.out('invoke success')
